<!DOCTYPE html>
<html>
{include file="public/head" /}
<body class="zanpian-body">
<section class="content">
<div class="row">
<div class="col-md-12">
<input type="hidden" id="actor_vid" name="actor_vid" value="{$vid|default=''}"> 
<div class="col-md-12 col-sm-12 col-xs-12 m10 pl0 pr0">
                <div class="input-group">
                <div class="input-group-btn">
                <span class="btn btn-default form-left-title">角色采集：</span>
               <span class="form-left-title-hide"></span>
                </div>
            <input type="text" class="form-control" id="actor_reurl" name="actor_reurl" value="{$info.actor_reurl|default=''}" placeholder="百度百科,搜百科,TV2345演员表,tvsou演员表,慢慢看演员表" >
                        <span class="input-group-btn">
                      <button type="button" class="btn  btn-primary btn-flat get_role">采集角色</button>
                    </span>
                </div> 
</div>
<div id="contents">
<div class="col-md-8 col-sm-12 col-xs-12 m10 pl0">
                <div id="toolbar" class="toolbar pull-left">
                <a href="{:url('show',array('vid'=>$vid))}" class="btn btn-primary ajax-url"><i class="fa fa-refresh"></i> </a> <a href="{:url('add',array('vid'=>$vid))}" data-name="添加配置" class="btn btn-success btn-add btn-editone" data-width="100%" data-height="100%" data-offset="0px"><i class="fa fa-plus"></i> 添加</a>
                <a  href="{:url('del')}" form="#list" class="confirm btn btn-danger btn-del btn-disabled ajax-post disabled hidden-xs"><i class="fa fa-trash"></i> 删除</a>
             {notempty name="GLOBALS['config']['html']['url_html']"}{notempty name="GLOBALS['config']['html']['url_role_data']"}
             <a data-url="{:url('admin/html/role_create',array('vid'=>$vid))}" form="#list" data-name="静态生成" class="confirm btn btn-facebook create-html">生成静态</a>
             {/notempty}{/notempty}                 
              <a  href="{:url('admin/batch/post',array('tpl'=>'status','sid'=>5,'field'=>'status','url'=>'field'))}" form="#list" data-name="批量审核" class="btn btn-default btn-del btn-disabled popurl disabled hidden-xs"><i class="fa fa-ban"></i> 审核</a>     
             <a  href="{:url('admin/batch/post',array('tpl'=>'stars','sid'=>5,'field'=>'stars','url'=>'field'))}" form="#list" data-name="批量设置星级" class="btn btn-default btn-del btn-disabled popurl disabled hidden-xs"><i class="fa fa-star-o"></i> 星级</a>
             <a  href="{:url('admin/batch/post',array('tpl'=>'hits','sid'=>5,'field'=>'hits','url'=>'field'))}" form="#list" data-name="批量设置人气" class="btn btn-default btn-del btn-disabled popurl disabled hidden-xs"><i class="fa fa-gear"></i> 人气</a>
             <a  href="{:url('admin/batch/post',array('tpl'=>'prty','sid'=>5,'field'=>'prty','url'=>'fields'))}" form="#list" data-name="批量设置推荐" class="btn btn-default btn-del btn-disabled popurl disabled hidden-xs"><i class="fa fa-thumbs-o-up"></i> 推荐</a>
             <a  href="{:url('pic/down',array('tab'=>'role','col'=>1,'opt'=>1,'fields'=>'vid','value'=>$vid))}" form="#list" data-name="同步角色图片" class="btn btn-default btn-editone hidden-xs"><i class="fa fa-picture-o"></i> 同步图片</a>
             <span id="selectedChks">已选择<strong></strong>记录</span>
             </div>
            <!-- /.toolbar -->
           </div>
           <div class="col-md-4 col-sm-12 col-xs-12 m10 pl0 pr0">
             <div class="select-group-t w120 search pull-right">
                <select name="pic" class="form-control select2 margin10" type="ajax-select" style="width:100%">
                <option value="{:url('show',array('vid'=>$vid,'prty'=>$prty,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>$type,'order'=>$order,'limit'=>$limit))}">图片筛选</option>
<option value="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>1,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>$type,'order'=>$order,'limit'=>$limit))}" {eq name="pic" value="1"}selected{/eq}>无图片</option>
<option value="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>2,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>$type,'order'=>$order,'limit'=>$limit))}" {eq name="pic" value="2"}selected{/eq}>远程图片</option>
<option value="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>3,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>$type,'order'=>$order,'limit'=>$limit))}" {eq name="pic" value="3"}selected{/eq}>本地图片</option>
<option value="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>4,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>$type,'order'=>$order,'limit'=>$limit))}" {eq name="pic" value="4"}selected{/eq}>出错图片</option>
</select>
              </div>  
                <div class="select-group-t w120 search pull-right">
                <select name="pic" class="form-control select2 margin10" type="ajax-select" style="width:100%">
                <option value="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'type'=>$type,'order'=>$order,'limit'=>$limit))}">内容筛选</option>
<option value="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>1,'type'=>$type,'order'=>$order,'limit'=>$limit))}" {eq name="content" value="1"}selected{/eq}>无介绍</option>
<option value="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>2,'type'=>$type,'order'=>$order,'limit'=>$limit))}" {eq name="content" value="2"}selected{/eq}>有介绍</option>
</select>
              </div>       
           </div>
    <!-- /.panel-tool -->
    <div class="tab-content list" id="list" method="post">
                    <table id="table" class="table table-striped table-bordered table-hover" style="margin-top: 0px;" width="100%">
                   <thead>
                    <tr>
                      <th style="text-align:center;vertical-align: middle; width:5%">
                      <label class="pretty success">
	                   <input type="checkbox" id="checkall" class="delcheckall"> 
	                    <label><i class="mdi mdi-check"></i></label>
	                  </label>
                      </th>
                      <th style="text-align:center;vertical-align: middle;">
                      {eq name="orders" value="id desc"}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'id','order'=>'asc','limit'=>$limit))}" class="text-link sort ajax-url">编号 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'id','order'=>'desc','limit'=>$limit))}" class="text-link sort ajax-url">编号 <i class="fa fa-angle-down"></i></a>{/eq}</th>
                      <th style="text-align:center;vertical-align: middle;" >角色</th>
                      <th style="text-align:center;vertical-align: middle;" >明星</th>
<th style="text-align:center;vertical-align: middle;" class="hidden-xs">{eq name="orders" value="oid desc"}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'oid','order'=>'asc','limit'=>$limit))}" class="text-link sort ajax-url">排序 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'oid','order'=>'desc','limit'=>$limit))}" class="text-link sort ajax-url">排序 <i class="fa fa-angle-down"></i></a>{/eq}</th>
                      <th style="text-align:center;vertical-align: middle;" class="hidden-xs">{eq name="orders" value="hits desc"}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'hits','order'=>'asc','limit'=>$limit))}" class="text-link sort ajax-url">人气 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'hits','order'=>'desc','limit'=>$limit))}" class="text-link sort ajax-url">人气 <i class="fa fa-angle-down"></i></a>{/eq}</th>
                       {notempty name="stars"}
                       <th style="text-align:center;vertical-align: middle;width:10%" class="hidden-xs">{eq name="orders" value="stars desc"}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'stars','order'=>'asc','limit'=>$limit))}" class="text-link sort ajax-url">星级 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'stars','order'=>'desc','limit'=>$limit))}" class="text-link sort ajax-url">星级 <i class="fa fa-angle-down"></i></a>{/eq}</th>  
                       {/notempty}
                      {notempty name="prty"}
                       <th style="text-align:center;vertical-align: middle;width:10%" class="hidden-xs">{eq name="orders" value="prty desc"}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'prty','order'=>'asc','limit'=>$limit))}" class="text-link sort ajax-url">推荐 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'prty','order'=>'asc','limit'=>$limit))}" class="text-link sort ajax-url">推荐 <i class="fa fa-angle-down"></i></a>{/eq}</th>  
                       {/notempty}                   
                      <th style="text-align:center;vertical-align: middle;" class="hidden-xs">{eq name="orders" value="addtime desc"}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'addtime','order'=>'asc','limit'=>$limit))}" class="text-link sort ajax-url">时间 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:url('show',array('vid'=>$vid,'prty'=>$prty,'pic'=>$pic,'stars'=>$stars,'status'=>$status,'content'=>$content,'type'=>'addtime','order'=>'desc','limit'=>$limit))}" class="text-link sort ajax-url">时间 <i class="fa fa-angle-down"></i></a>{/eq}</th>                      
                      <th style="text-align:center;vertical-align: middle;">操作</th>
                    </tr>
                  </thead>                
               <tbody>
               {notempty name="list"}
               {volist name="list" id="vo"}
               <tr>
                <td class="bs-checkbox" style="text-align:center;vertical-align:middle; font-size:14px">
                <label class="pretty success">
                <input type="checkbox" name="id[]" value="{$vo['role_id']}" id="checkbox"> 
	            <label><i class="mdi mdi-check"></i></label>
	            </label>
                </td>
                 <td style="text-align:center;vertical-align: middle;"><a href="{:zanpian_read_url('home/role/read',$vo)}" class="text-link" target="_blank">{$vo['role_id']}</a></td>
                
                <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" class="editable editable-click text-link" data-id="{$vo['role_id']}" data-name="role_name" data-type="text" data-pk="{$vo['role_id']}" data-url="{:url('editable')}" data-title="修改角色名">{$vo.role_name}</a></td>
                
               <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" class="editable editable-click text-link" data-id="{$vo['role_id']}" data-name="role_star" data-type="text" data-pk="{$vo['role_id']}" data-url="{:url('editable')}" data-title="修改明星名">{$vo.role_star}</a></td>
               <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" class="editable editable-click text-link" data-id="{$vo['role_id']}" data-name="role_oid" data-type="text" data-pk="{$vo['role_id']}" data-url="{:url('editable')}" data-title="修改排序">{$vo.role_oid}</a></td>
<td style="text-align:center;vertical-align: middle;"><a href="javascript:;" class="editable editable-click text-link" data-id="{$vo['role_id']}" data-name="role_hits" data-type="text" data-pk="{$vo['role_id']}" data-url="{:url('editable')}" data-title="修改人气">{$vo.role_hits}</a></td>
                 {notempty name="stars"}
                <td style="text-align:center;vertical-align: middle;">{volist name=":admin_star_arr($vo.role_stars)" id="ajaxstar"}<img src="{$Think.TPL_PATH}tpl/zanpianadmin/img/star{$ajaxstar}_1.gif" class="addstars">{/volist}</td>
                 {/notempty}               
                {notempty name="prty"}
                <td style="text-align:center;vertical-align: middle;">
                  {volist name="list_prty" id="prty"}
                 {if check_attribute($vo['role_prty'],$key)}<span class="btn bg-maroon-{$i} btn-xs">{$prty|msubstr=0,2}</span>&nbsp;{/if}
                 {/volist}</td>
                 {/notempty}
                <td style="text-align:center;vertical-align: middle;">{$vo.role_addtime|date='Y-m-d H:i:s',###}</td>
                <td style="text-align:center;vertical-align: middle;">
                {eq name="vo.role_status" value="1"} <a class="btn btn-info btn-xs btn-facebook ajax-post" href="{:url('status',array('id'=> $vo['role_id'],'status'=>0))}">已审</a>{else /}<a class="btn btn-info btn-xs btn-danger ajax-post" href="{:url('status',array('id'=> $vo['role_id'],'status'=>1))}">未审</a>{/eq}
                
                <a href="{:url('edit',array('id'=>$vo['role_id']))}"  data-name="编辑" class="btn btn-success btn-editone btn-xs" data-width="100%" data-height="100%" data-offset="0px"><i class="fa fa-pencil"></i> 编辑</a> <a href="{:url('del',array('id'=>$vo['role_id']))}" class="confirm btn btn-danger btn-xs confirm ajax-post"><i class="fa fa-trash-o"></i> 删除</a>   
                  </td>
              </tr>
              {/volist}
                 {else/}<tr><td style="text-align:center;vertical-align: middle;" colspan="15" >抱歉，没有找到相关内容！</td></tr>{/notempty} 
            </tbody>
                </table>
            </div>
            {gt name="list->lastPage()" value="1"}
           <div class="panel-page">
              <div class="pull-left panel-page-info hidden-xs"><span class="pagination-info">共{$list->total()}条 {$list->currentPage()}/{$list->lastPage()} </span><span class="page-list">每页显示 {$list->listRows()} 条</span></div>
              <div class="panel-page-url ajax-page">
               <ul class="pagination"> {$list->render()} <div class="panel-page-select pull-left"><select class="select2 ajax-select" data-url="{:url_page(request()->action(),request()->param(),1)}"><option value="10" {eq name="limit" value="10"}selected{/eq}>10 条/页</option><option value="20" {eq name="limit" value="20"}selected{/eq}>20 条/页</option><option value="30" {eq name="limit" value="30"}selected{/eq}>30 条/页</option><option value="40" {eq name="limit" value="40"}selected{/eq}>40 条/页</option><option value="50" {eq name="limit" value="50"}selected{/eq}>50 条/页</option><option value="99" {eq name="limit" value="99"}selected{/eq}>99 条/页</option></select></div><div class="panel-page-jump "><input type="input" name="page" id="page" min="1" value="{$list->currentPage()}" class="form-control"/><input type="button" value="跳 转" data-url="{:url_page(request()->action(),request()->param())}" class="btn btn-default ajax-jump" /></div></ul>
              </div>
            </div>
           <!-- /.panel-page --> 
            {/gt}

    
         </div>
         <!-- /.panel-body --> 
          <!-- /.nav-tabs-custom -->
        </div>
        </div>
        </section>
       <!-- /.box-footer -->   
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
	zanpian.cms.all();
   $(document).on('click', ".get_role", function(){
			 var actor_vid = $("#actor_vid").val();
			 var actor_reurl = $("#actor_reurl").val();
			 if(actor_vid==''){
				return layer.msg('视频ID不能为空', {icon: 2});
			 }
			if(actor_reurl==''){
				return layer.msg('采集地址不能为空', {icon: 2});
			 }
			 layer.msg('数据获取中...');
			 $.ajax({
					type: 'post',
					url: zanpian.api.fixurl('get/actor'),
					data: {'actor_vid':actor_vid,'actor_reurl':actor_reurl},
					dataType: 'json',
					success: function(data) {
							if (data.code >= 1) {
								layer.msg(data.msg ? data.msg : '采集入库角色成功', {icon:1,time: 1800});
								zanpian.api.url(zanpian.api.fixurl('role/show/vid/'+actor_vid));
							} else {
						        layer.msg(data.msg ? data.msg : '采集入库角色失败', {icon:2,time: 1800});
					        }
					},
				     error: function(data) {
					      layer.confirm('程序返回：' + data.status + ' 错误,点击查看详细错误', {zIndex:layer.zIndex,icon: 5, title:'出错啦！',btn: ['查看', '关闭']}, function() {$('html').html(data.responseText);});
				            },
			});
   })  		
});	
</script>
</body>
</html>
